# Drone CI config for building Hugo sites with Codeberg.org

Create your Hugo site on a directory, such as `src`.

```
hugo new site src
cd src
# add a theme
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
echo 'theme = "ananke"' >> config.toml
# add a post (optional)
hugo new posts/my-first-post.md
sed -i 's/draft: true/draft: false/' content/posts/my-first-post.md
# set publishdir to repo root
echo 'publishdir = "../"' >> config.toml
```

Put the `.drone.yml` from this directory to the repo root directory on your pages repo. Change:

- `remote` - paste in your repo's ssh url
- `branch` - the branch you want to push the results (usually `main` or `master`)
- `author_name` - commit author (appears on commit info nothing else)
- `author_email` - commit author email (appears on commit info nothing else)

Check [../codeberg-push/README.md](../codeberg-push/README.md#instructions) for details on how to setup ssh keys and stuff.

## Demo

[https://hugo-test.codeberg.page/](https://hugo-test.codeberg.page/) - [source repo](https://codeberg.org/hugo-test/pages)
